<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <f:event type="preRenderView" listener="#{navigator.authNav}" />
    <ui:insert name="metadata"></ui:insert>
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <title><ui:insert name="title"></ui:insert></title>
    </h:head>

    <h:body>
        <div id="container">
            <div id="header">
                <div class="top-nav-info">
                    <ui:insert name="header"> 
                        <h:form>
                            <font color="white">
                                <h:outputText value="欢迎您：#{currentUser.username}"/>
                                <h:commandLink value="退出" action="#{logoutBacking.logoutAction()}"  immediate="true" shape="rect" />
                            </font>
                        </h:form>
                    </ui:insert>
                </div>

            </div>
            <div id="menu">
                <ui:insert name="menu"> </ui:insert>
            </div>

            <div id="mainContent">
                <div id="sidebar">
                    <ui:insert name="sidebar">
                        <h:form>
                            <ul class="nav">
                                <c:if test="#{currentUser.username!='admin'}">
                                    <li>
                                        <h:link outcome="calendar.xhtml" value="我的日程" shape="rect"/>
                                    </li>
                                    <li>
                                        <h:link outcome="myinfos.xhtml" value="个人信息" shape="rect"/>
                                    </li>
                                    <li>
                                        <h:link outcome="home.xhtml" value="通知提醒" shape="rect"/>
                                    </li>
                                    <li><font size="2">公文管理</font></li>
                                    <li>                                 
                                        <h:link outcome="apply_forms.xhtml" value="&nbsp;&nbsp;&nbsp;&nbsp;文件申请" shape="rect"/>
                                    </li>
                                    <li>
                                        <h:link outcome="tasklist.xhtml" value="&nbsp;&nbsp;&nbsp;&nbsp;文件批复" shape="rect"/>
                                    </li>
<!--                                    <li>
                                        <h:link outcome="application_record.xhtml" value="&nbsp;&nbsp;&nbsp;&nbsp;申请记录" shape="rect"/>
                                    </li>-->
                                    <li>

                                        <h:link outcome="equipment_apply.xhtml" value="设备申请" shape="rect"/>
                                    </li>
                                    <li>
                                        <h:link outcome="location_apply.xhtml" value="场地申请" shape="rect"/>
                                    </li>
<!--                                    <li>
                                        <h:link outcome="test.xhtml" value="test" shape="rect"/>
                                    </li>-->
                                </c:if>
                                <c:if test="#{currentUser.username=='admin'}">
                                    <li>
                                        <h:link outcome="member.xhtml" value="人员管理" shape="rect" />
                                    </li>
                                    <li>
                                        <h:link outcome="equipment.xhtml" value="设备管理" shape="rect"/>
                                    </li>
                                    <li>
                                        <h:link outcome="location.xhtml" value="场地管理" shape="rect"/>
                                    </li>
                                </c:if>
                            </ul> 

                            <!--
                            <ul class="nav">
                             <li><a href="./schedule.f">我的日程</a></li>
                             <li><a href="myinfos.f">个人信息</a></li>
                             <li><a href="home.f">通知提醒</a></li>
                             <li><font size="2">公文管理</font></li>
                             <li><a href="apply_forms.f">&nbsp;&nbsp;&nbsp;&nbsp;文件申请</a></li>
                             <li><a href="tasklist.f"> &nbsp;&nbsp;&nbsp;&nbsp;文件批复</a></li>
                             <li><a href="equipment_manage.f">设备管理</a></li>
                             <li><a href="location_appointment.f">场地预约</a></li>
                         </ul>
                            -->
                            <!--<li><a><h:link value="test" outcome="home">
                                             <f:param name="user" value="#{currentUser.username}" />
                                         </h:link></a></li>
                              <h:form>
                                  <h:panelGrid columns="1">
                                       <h:commandLink action="schedule2.xhtml" value="我的日程" shape="rect"></h:commandLink>
                                       <h:commandLink action="myinfos2.xhtml" value="个人信息"></h:commandLink>
                                       <h:commandLink action="home.xhtml" value="通知提醒"></h:commandLink>
                                       <h:outputText value="公文管理"/>
                                       <h:commandLink action="doc_manage2.xhtml" value="&nbsp;&nbsp;&nbsp;&nbsp;公文申请"></h:commandLink>
                                       <h:commandLink action="tasklist.xhtml" value="&nbsp;&nbsp;&nbsp;&nbsp;公文审批" />
                                       <h:commandLink action="equipment_manage2.xhtml" value="设备管理"></h:commandLink>
                                       <h:commandLink action="location_appointment2.xhtml" value="场地预约"></h:commandLink>
                                   </h:panelGrid>
                               </h:form> -->  
                        </h:form>
                    </ui:insert>

                </div>

                <div id="content">
                    <ui:insert name="content"> </ui:insert>
                </div>
            </div>
            <div class="clearfloat">
            </div>
            <div id="footer">
                <ui:insert name="footer">
                    <h:outputText escape="false" value="Copyright &amp;copy; 2012 OfficeBoost团队"/>
                </ui:insert>
            </div>
        </div>

    </h:body>
</html>
